<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>运城市安全生产隐患排查治理信息系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css"/>
	<link rel="STYLESHEET" type="text/css" href="<%=basePath%>/dtree/dhtmlxtree.css">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/check_jquery.js"></script>
	<script  src="<%=basePath%>/dtree/dhtmlxcommon.js"></script>
	<script  src="<%=basePath%>/dtree/dhtmlxtree.js"></script>
	<script type="text/javascript">
		function tonclick(id) {
			document.getElementById('cType').value=id;
			document.itemForm.submit();
		};
		var b=false;
		function funSubmit(){
			var objId = '${bgdId}';
			var urls="<%=basePath%>/zczb/_bgdCheck.action?bgdId="+objId;
			var bgdUser = $("#bit1").val();
			$.get(urls,function(data){
				if(data=="0"){
					alert('您未进行隐患自查不能保存，请按照自查标准自查后再保存！');
					return;
				}else{
					if(null==bgdUser || bgdUser==""){
						alert('请填写自查负责人！');
						return;
					}else{
						document.bgdform.submit();
					}
				}
			});
    	}
    	
    	$(function() {
    				tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
					tree.setSkin('dhx_skyblue');
					tree.setImagePath("<%=basePath%>/dtree/imgs/csh_winstyle/");
					tree.enableDragAndDrop(0);
					tree.enableTreeLines(false);
					tree.setOnClickHandler(tonclick);
					tree.loadXMLString("<%=request.getAttribute("itemXml")%>");
    	});
	</script>
  </head>
  
 <body>
<div id="allbody">
	<div class="head">
		<iframe src="<%=basePath%>/head.jsp" width="1160" height="218" scrolling="no" frameborder="0" ></iframe>
	</div>
	<div class="con">
		<div class="left">
			<div class="left_info">
				<div class="left_top"> <img src="<%=basePath%>/images/left_top.jpg"/>
					<div  id="treeboxbox_tree" name="treeboxbox_tree" style="overflow:auto">
						<h4>
							<br/>
							&nbsp;&nbsp;<b>${tab.tabName }</b><br/>
			    			&nbsp;&nbsp;右侧默认为现场管理自查内容
						</h4>
					</div>
				</div>
			</div>
		</div>
		<div class="right">
			<div class="right_map">
				<div style="float: left;"><a href="<%=basePath%>/corp/index.action">首页</a> &gt; <span><a href="<%=basePath%>/zczb/_index.action">自查自报</a></span>&gt; <span>新建自查</span></div>
			  	<div class="map_btn"><input type="button" name="btntj" class="input_link" onclick="window.location.href='<%=basePath%>/zczb/_bgdList.action'" value="返回自查记录列表"/></div>
			</div>
			<div>
			  	<iframe id="itemFrame" name="itemFrame" style="height:480px;inherit;WIDTH:100%;Z-INDEX:2;position:relative;" scrolling="yes" frameborder="0" src="<%=basePath %>/zczb/_bzhList.action?bgdId=${bgdId }&hzdId=${hzdId }"></iframe>
			  	<form action="<%=basePath%>/zczb/_saveBgd.action" name="bgdform" method="post">
					自查负责人：<input type="text" name="bgdPersonnel" id="bit1" value="${bgd.bgdPersonnel }"><label class="note4">*</label> 
					&nbsp;&nbsp;&nbsp;<input type="button" id="btnSubmit" name="btntj" class="input_link" value="保 存" onclick="funSubmit();"/>
					<input type="hidden" name="bgdId" id="bgdId" value="${bgdId }">
					<input type="hidden" name="hzdId" id="hzdId" value="${hzdId }">
				</form>
			</div>
		</div>
	</div>
	<div class="foot">
		<iframe src="<%=basePath%>/foot.html" width="1160" height="89" scrolling="no" frameborder="0" ></iframe>
	</div>
</div>
<form action="<%=basePath %>/zczb/_bzhList.action" name="itemForm" method="post" target="itemFrame">
		<input type="hidden" name="cType" id="cType" value="">
		<input type="hidden" name="bgdId" id="bgdId" value="${bgdId }">
		<input type="hidden" name="hzdId" id="hzdId" value="${hzdId }">
</form>
</body>
</html>
